<!doctype html>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html lang="en">


<head>
  <meta charset="utf-8">
  <title>PA-Learning</title>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="shortcut icon" href="img/icons/basic/favicon.png">
 
  <!---CSS Files-->
  <link rel="stylesheet" href="${pageContext.request.contextPath}/Vues/css/master.css">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/Vues/css/tables.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/Vues/css/iphone-check.css">
  <!---jQuery Files-->
  <script src="${pageContext.request.contextPath}/Vues/js/jquery-1.7.1.min.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/jquery-ui-1.8.17.min.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/styler.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/jquery.tipTip.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/colorpicker.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/sticky.full.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/global.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/flot/jquery.flot.min.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/flot/jquery.flot.resize.min.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/jquery.dataTables.min.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/forms/fileinput.js"></script>
  <script src="${pageContext.request.contextPath}/Vues/js/forms/iphone-check.js"></script>
  <!---Fonts-->
  <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Ubuntu:500' rel='stylesheet' type='text/css'>
  <!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <!--[if lte IE 8]>
  <script language="javascript" type="text/javascript" src="js/flot/excanvas.min.js"></script>
  <![endif]-->
</head>
<body>

  <!--- HEADER -->

	<div class="header">
   <a href="dashboard.html"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/logo.png" alt="Logo" /></a> 
   <div class="styler">
     <ul class="styler-show">
       <li><div id="colorSelector-top-bar"></div></li>
       <li><div id="colorSelector-box-head"></div></li>
     </ul>
   </div>
  </div>

  <div class="top-bar">
      <ul id="nav">
        <li id="user-panel">
          <img src="img/nav/usr-avatar.jpg" id="usr-avatar" alt="" />
          <div id="usr-info">
            <p id="usr-name">Bienvenue, <s:property value="session['login']"/>.</p>
            <p id="usr-notif">You have 6 notifications. <a href="#">View</a></p>
            <p><a href="deconnecterAdmin">D&eacute;connection</a></p>
          </div>
        </li>
        <li>
        <ul id="top-nav">
         <li class="nav-item">
             <a href="accueiladmin.jsp"><img src="${pageContext.request.contextPath}/Vues/img/nav/dash-active.png" alt="" /><p>Accueil</p></a>
         </li>
         
         <li class="nav-item">
             <a href="gestiondescours.jsp"><img src="${pageContext.request.contextPath}/Vues/img/nav/tb.png" alt="" /><p>Cour</p></a>
        <ul class="sub-nav">
							<a href="theme"><p>Theme</p></a>
							<a href="module"><p>Module</p></a>
							<a href="affect"><p>Affectation</p></a>
							<a href="parti"><p>Partie</p></a>
							<a href="sequenceadmin"><p>sequence</p></a>
						

				</ul>
       
          </li>
        
         <li class="nav-item">
           <a href="testAdmin"><img src="${pageContext.request.contextPath}/Vues/img/nav/widgets.png" alt="" /><p>Examen</p></a>
         </li>
         <li class="nav-item">
           <a href="grid.html"><img src="${pageContext.request.contextPath}/Vues/img/nav/grid.png" alt="" /><p>Messagerie</p></a>
           
         </li>
         <li class="nav-item">
           <a href="filemanager.html"><img src="${pageContext.request.contextPath}/Vues/img/nav/flm.png" alt="" /><p>Forum</p></a>
         </li>
         <li class="nav-item">
           <a href="findActualite"><img src="${pageContext.request.contextPath}/Vues/img/nav/gal.png" alt="" /><p>Actualit&eacute;</p></a>
         </li>
         <li class="nav-item">
           <a href="index"><img src="${pageContext.request.contextPath}/Vues/img/nav/icn.png" alt="" /><p>Comptes</p></a>
         </li>
         <li class="nav-item">
           <a href="Afficherprofiladmin?pk=<s:property value="pk"/>"><img src="${pageContext.request.contextPath}/Vues/img/nav/err.png" alt="" /><p>Profil</p></a>
          
         </li>
         
       </ul>
      </li>
     </ul>
  </div>

  <!--- CONTENT AREA -->

  <div class="content container_12">
      <div class="ad-notif-info grid_12"><p>Bienvenue Vous pouvez m'envoyer en cliquant sur moi !</p></div>
      <div class="box grid_3">
        <div class="box-head"><h2>Simple Panel</h2></div>
        <div class="box-content">
          <p>This is a simple panel. All panels in Adminity are collapsible by clicking on the header.
          <br>
          Creating a panel like this one is very easy, 
          you only need 3 divs with classes 'box', 'box-head' and 'box-content'.
          <br><br>
          Adminity also includes a styler. Open it by clicking the eye icon near the logo. A tooltip will tell you what color each colorpicker changes.<br><br>
          <input type="button" class="button green" value="Read more" />
          </p>
        </div>
      </div>
      <div class="box grid_3">
        <div class="box-head"><span class="box-icon-24 fugue-24 counter"></span><h2>Stats</h2></div>
        <div class="box-content ad-stats">
          <ul>
            <li><h3>21594</h3> Unique Visitors</li>
            <li class="stats-up"><h3>52100</h3> Page Views</li>
            <li class="stats-up"><h3>$2652</h3> Ad Revenue</li>
            <li class="stats-down"><h3>$125</h3> Maintenance Costs</li>
            <li class="stats-up"><h3>+2</h3> Moved up Google</li>
          </ul>
        </div>
      </div>
      <div class="box grid_6">
        <div class="box-head"><span class="box-icon-24 fugue-24 system-monitor"></span><h2>Chart</h2></div>
        <div class="box-content">
          <div id="flot-demo"></div>
        </div>
      </div>
      <div class="box grid_12">
        <div class="box-head"><h2>Gestion Des Comptes</h2></div>
        <div class="box-content no-pad">
        <table class="display" id="example">
        <thead>
          <tr>
            <th>Login</th>
            <th>Mot de passe </th>
            <th>Profession</th>
            <th>Code entreprise</th>
            <th> Option</th>
          </tr>
        </thead>
        <tbody>
        <s:iterator value="listeAbonnements">
          <tr class="odd gradeX">
            <td><s:property value="Login"/></td>
            <td><s:property value="Pass"/></td>
            <td><s:property value="type"/></td>
            <td class="center"> 4</td>
            <td><s:a   href="update?pk=%{Logi}"><img src="${pageContext.request.contextPath}/Vues/images/modifier.ico" /></s:a><s:a  href="delc?pk=%{Logi}"  ><img src="${pageContext.request.contextPath}/Vues/images/supprimer.png" /></s:a ></td>
            
          </tr>
         </s:iterator>         
        </tbody>
      </table>
        </div>
      </div>

      <div class="box grid_6">
        <div class="box-head"><h2>Creer un Compte</h2></div>
        <div class="box-content">
        <s:actionerror/>
            <form action="" method="Post" id="f1" >
            <s:hidden name="pk" value="%{pk}"></s:hidden>
           <div class="form-row">
            <p class="form-label">Login</p>
            <div class="form-item"><s:textfield name="login"  value="%{login}"/></div>
           </div>
           <div class="form-row">
            <p class="form-label">Mot de passe</p>
            <div class="form-item"><s:textfield name="pass"  value="%{pass}" /></div>
           </div>
           <div class="form-row">
            <label class="form-label">Profession</label>
             <div class="form-item">
             <s:select  name="type" list="%{#{'Formateur':'Formateur','Administrateur':'Administrateur','Entreprise':'Entreprise','Responsable de Qualite':'Responsable de Qualite'}}" value="%{type}"></s:select>
               
             </div>
           </div>
           
           <input type="submit" class="button black" value="Ajouter" onclick="addcompte()">
           <input type="submit" class="button orange" value="Modifier" onclick="verif_creer()">
          <div class="clear"></div>
          </form>
        </div>

      </div>

      <div class="box grid_6">
        </div>

<div class="footer">
 
</div>

<script> /* SCRIPTS */
  $(function () {
      var sin = [], cos = [];
      for (var i = 0; i < 14; i += 0.5) {
          sin.push([i, Math.sin(i)]);
          cos.push([i, Math.cos(i)]);
      }
      var plot = $.plot($("#flot-demo"),
             [ { data: sin, label: "Green", color: "#71a100"}, { data: cos, label: "Blue", color: "#308eef" } ], {
                 series: {
                     lines: { show: true },
                     points: { show: true }
                 },
                 grid: { hoverable: true },
                 yaxis: { min: -1.2, max: 1.2 }
               });
      var previousPoint = null;
      $("#flot-demo").bind("plothover", function (event, pos, item) {
          if ($("#enablePosition:checked").length > 0) {
              var str = "(" + pos.x.toFixed(2) + ", " + pos.y.toFixed(2) + ")";
              $("#hoverdata").text(str);
          }
      });
  });/* for the flot chart demo */

  $('#example').dataTable( {
      "bJQueryUI": true
  }); /* For the data tables */

  $('#iphone-check').iphoneStyle();
  $("#datepicker").datepicker();
  $("#colorpicker").ColorPicker();
  /* for the iPhone style checkbox, colorpicker and datepicker */

</script>
	<script type="text/javascript">
function addcompte()
{

    document.getElementById("f1").action="add";
    
    
    document.getElementById("f1").submit();
 
}

function verif_creer()
{
    document.getElementById("f1").action="update";
    
    
    document.getElementById("f1").submit();
    
}

</script>

</body>
</html>